1e545594d0cacd4674ff0f83a7bd5666bf261bf6,rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java,PolicyBasedWSS4JInInterceptor,checkSymmetricBinding,#AssertionInfoMap#String#SoapMessage#,285
Before Change
action = addToAction(action, "Signature", true);
action = addToAction(action, "Encrypt", true);
Object s = message.getContextualProperty(SecurityConstants.SIGNATURE_PROPERTIES);
Object e = message.getContextualProperty(SecurityConstants.ENCRYPT_PROPERTIES);
if (e != null && s == null) {
s = e;
} else if (s != null && e == null) {
e = s;
}
if (isRequestor(message)) {
if (e != null) {
URL propsURL = getPropertiesFileURL(e, message);
String propsKey = e.toString();
if (propsURL != null) {
propsKey = propsURL.getPath();
}
message.put(WSHandlerConstants.SIG_PROP_REF_ID, "RefId-" + propsKey);
message.put("RefId-" + propsKey, getProps(e, propsKey, propsURL, message));
}
if (s != null) {
URL propsURL = getPropertiesFileURL(s, message);
String propsKey = s.toString();
if (propsURL != null) {
propsKey = propsURL.getPath();
}
message.put(WSHandlerConstants.DEC_PROP_REF_ID, "RefId-" + propsKey);
message.put("RefId-" + propsKey, getProps(s, propsKey, propsURL, message));
}
} else {
if (s != null) {
After Change
action = addToAction(action, "Signature", true);
action = addToAction(action, "Encrypt", true);
Object s = message.getContextualProperty(SecurityConstants.SIGNATURE_CRYPTO);
if (s == null) {
s = message.getContextualProperty(SecurityConstants.SIGNATURE_PROPERTIES);
}
Object e = message.getContextualProperty(SecurityConstants.ENCRYPT_CRYPTO);
if (e == null) {
e = message.getContextualProperty(SecurityConstants.ENCRYPT_PROPERTIES);
}
if (e != null && s == null) {
s = e;
} else if (s != null && e == null) {
e = s;
}
if (isRequestor(message)) {
if (e != null) {
URL propsURL = getPropertiesFileURL(e, message);
String propsKey = e.toString();
if (propsURL != null) {
propsKey = propsURL.getPath();
}
message.put(WSHandlerConstants.SIG_PROP_REF_ID, "RefId-" + propsKey);
if (e instanceof Crypto) {
message.put("RefId-" + propsKey, (Crypto)e);
} else {
message.put("RefId-" + propsKey, getProps(e, propsKey, propsURL, message));
}
}
if (s != null) {
URL propsURL = getPropertiesFileURL(s, message);
String propsKey = s.toString();
if (propsURL != null) {
propsKey = propsURL.getPath();
}
message.put(WSHandlerConstants.DEC_PROP_REF_ID, "RefId-" + propsKey);
if (s instanceof Crypto) {
message.put("RefId-" + propsKey, (Crypto)s);
} else {
message.put("RefId-" + propsKey, getProps(s, propsKey, propsURL, message));
}
}
} else {